package com.jiangxjsy.authorization.service;

import com.jiangxjsy.core.wrap.Result;
import com.jiangxjsy.model.authorization.entity.AuthorizationUser;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * wukong-crm-master
 * 蒋胜宇
 * 2025/6/3 16:47
 */

public interface LoginService {
    /**
     * 权限校验
     *
     * @param authentication 用户权限标识
     * @param url 请求地址
     * @param method 请求方法
     * @return Result
     */
    Result<?> permission(String authentication, String url, String method);

    /**
     * 登录
     *
     * @param user 用户信息
     * @param response 响应
     * @param request 请求
     * @return Result
     */
    Result<?> login(AuthorizationUser user, HttpServletResponse response, HttpServletRequest request);

    /**
     * 注销
     *
     * @param authentication 用户权限标识
     * @return Result
     */
    Result<?> logout(String authentication, HttpServletResponse response, HttpServletRequest request);
}
